﻿<%@ Page Title="上传摄影作品" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    Inherits="Wjtour.Web.Front.photographynew" %>


<%@ Register TagPrefix="CuteWebUI" Namespace="CuteWebUI" Assembly="CuteWebUI.AjaxUploader" %>
<%@ Import Namespace="Wjtour.Domain" %>
<%@ Import Namespace="Wjtour.Common" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <!-[if IE 6]>
    <script language="javascript" src="js/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>
        DD_belatedPNG.fix('.item,background');
    </script>
    <![endif]->
    
    <script language="javascript">
        $(document).ready(function () {
            var height = $('.inpageright').height(); // 通过这个数字来控制显示的子菜单
            var h = Math.max(325, height);
            $('.inpageleft').height(h);
        });

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <div class="ipage indexpage">
        <!--左侧-->
        <div class="inpageleft">
            <div class="siderbox">
                <img src="css/images/title06.jpg" />
                <div class="hrs"></div>
                <div class="welcome">
                    <%=CurrentDate %><span class="weekstr"><%=CurrentDay %></span><br />
                    <%=CurrentMember.username %>，您好<br />
                        <a href="logout.aspx">退出登录</a><br />
                    <span class="welcomewords">欢迎登录吴江旅游网</span>

                </div>
            </div>
            <!--侧导航下方-->
            <br />
            <img src="css/images/line01.png" />
            <br />
            <div class="siderbox">
                <ul class="sidertitle">
                    <li><a href="memberinfoedit.aspx">
                        <img src="css/images/membersider01.png" /></a>
                    </li>
                    <li><a href="memberpassedit.aspx">
                        <img src="css/images/membersider02.png" /></a>
                    </li>
                    <li><a href="articlemanage.aspx">
                        <img src="css/images/membersider03.png" /></a>
                    </li>
                    <li><a href="photography.aspx">
                        <img src="css/images/membersider04.png" /></a>
                    </li>
                </ul>
            </div>

        </div>

        <!--右侧-->
        <div class="inpageright">
            <div class="path">
                <span>上传摄影作品</span>
                当前位置：<a href="/">首页</a> &gt; 会员中心 &gt; 摄影作品管理 &gt;  上传摄影作品
            </div>
            <div class="content">
                <div class="form-horizontal">
                    <div class="control-group">
                        <label class="control-label" for="name"><span class="help-inline redwords">*</span> 图片标题：</label>
                        <div class="controls">
                            <asp:TextBox ID="title" Width="300" runat="server" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name"><span class="help-inline redwords">*</span> 上传图片：</label>
                        <div class="controls">
                            <CuteWebUI:Uploader ID="Uploader1" runat="server" InsertButtonID="btnPublish" MultipleFilesUpload="true">
                            </CuteWebUI:Uploader>
                            <asp:Button ID="btnPublish" runat="server" Text="添加图片" />
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" for="name"><span class="help-inline redwords">*</span> 图片预览：</label>
                        <div class="controls">
                            <ul class="memberimglist previewlist">

                                <asp:Repeater ID="rptPreview" runat="server">
                                    <ItemTemplate>
                                        <li>
                                            <div>
                                                <img src="<%# Eval("picturepath") %>" style="width: 100px; height: 73px;" />
                                            </div>
                                            <span>
                                                <input type='button' value="删除" onclick="removepic(<%# Eval("id") %>)" />&nbsp;
                                            </span>
                                        </li>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </ul>
                        </div>
                    </div>

                    <div class="control-group">

                        <div class="controls">
                            <asp:Button ID="submit" runat="server" Text="提交" CssClass="memberbutton"/>
                        </div>
                    </div>

                </div>

            </div>
        </div>
        <div class="clear"></div>
    </div>
    <script type="text/javascript">
        function removepic(picid) {
            if(picid==0){
                window.location.reload();
            }
            $.ajax({
                url: '/admin/ajax/PictureHandler.ashx',
                data: { 'type': 'removepic', 'picid': picid },
                dataType: 'json',
                success: function (d) {
                    if (d.Errcode != "0") {
                        alert(d.Errmsg);
                    } else {
                        window.location.reload();
                    }
                },
                error: function () {

                }
            });
        }
    </script>
</asp:Content>
